<div id="banner">

<? //print_r($this->session->all_userdata());
//echo $this->uri->segment(6);	 
$ingame = $this->session->userdata('ingame');

$deltager = $this->session->userdata('deltager');
//print_r($deltager);

if(!empty($ingame)){
 echo "<form id='lup_find' action='".base_url()."find' method='post'>";  
 

 
   


 echo "<div class='lup'>";



     echo "<textarea class='lup_soeg' name='request' rows='6' cols='20'></textarea> ";




    echo "</div>";
    echo "<input id='find' class='rubrik' type='submit' value='FIND' />";
    echo "</form>";	
}

	
	
		if($deltager['is_logged_in'] == true){ ?>
			<a href="<? echo base_url(); ?>deltager/logout" class="noegle" style="float:left;margin:40px 0px 0px -60px;" title="LOG UD">
			</a>
	<?	}
		else { echo "<div style='float:left;margin:40px 0px 0px -60px;height:98px;width:100px;'></div>";}	 ?>

		<div style="margin:0px 0px 0px 0px;padding:15px 0px 0px 30px;height:125px;width:340px;float:left;">

			<a onclick="showstuff('ark')" href="#" title="Skift Blik">
				<div style="float:right;height:70px;width:100px;margin:0px 0px 0px 0px;"></div>
			</a>
		<? if ($deltager['is_logged_in'] == true){?>
   			<a href="<?echo base_url();?>forord" title="Indholdsfortegnelsen">
        <? }
        else{ ?>
            <a href="<?echo base_url();?>" title="Login">
        <? } ?>
				<div style="height:70px;width:250px;margin:0px 0px 0px -30px;"></div>
			</a>
			<div style="padding:1px 0px 0px 50px;">
				<p class="rubrik">
					<b>Rollespiller:</b> 
					<? if (isset($deltager)) { 
						echo $deltager['fornavn']." ".$deltager['efternavn']; 
					} ?>
				</p>
				<p class="ink">
					<b>Rolle:</b> <?
					if($ingame['ingame_id'] == 0 and $deltager['is_logged_in'] == true){ 
						echo anchor("gamemaster/dashboard","Gamemaster","class='ink'") ;
					}
					elseif($ingame['ingame_id'] == -1 and $deltager['is_logged_in'] == true){ 
						echo anchor("admin/dashboard","Sideadministrator","class='ink'") ;
					}
					else{ 

						if($deltager['is_logged_in'] == true){							
							echo anchor("almanak/side/".$ingame['ingame_id'],$ingame['ingame_navn'],"class='ink'") ;
						}
						
					}?>
				</p>
				<p class="ink"><b>Kampagne:</b> 
	<?			if($deltager['is_logged_in'] == true){
					echo anchor("almanak/side/".$ingame['kampagne_id'],$ingame['kampagne_navn'],"class='ink'") ;
				}?>

				</p>
			</div>
		</div>

	<div style="float:left;padding:60px 0px 0px 12px;height:60px;width:80px;">

    </div>
	<? if($this->uri->segment(1,"tom") != "login" and $this->uri->segment(1,"tom") != "tom") {;?>
	<div id="bogmaerker_top"   >
				
		<nav id="bogmaerker_opret" >
			<a class="opret_begivenhed" href="<? echo base_url(); ?>core/opret/ny/begivenhed" title="Opret Ny Begivenhed">
			</a>

			<a class="opret_individ" href="<? echo base_url(); ?>core/opret/ny/individ" title="Opret Ny NPC">
			</a>

			<a class="opret_gruppe" href="<? echo base_url(); ?>core/opret/ny/gruppe" title="Opret Ny Gruppe">
			</a>

			<a class="opret_sted" href="<? echo base_url(); ?>core/opret/ny/sted" title="Opret Nyt Sted">
			</a>

		</nav>

		<nav id="bogmaerker_global" >

        <?if($ingame['ingame_id'] == 0) { ;?>
			<a  class="global_indhold"  
                href="<? echo base_url(); ?>gamemaster/dashboard"
                title="Indholdsfortegnelse"
            >
			</a>
        <?}elseif($ingame['ingame_id'] == -1) { ;?>
			<a  class="global_indhold"  
                href="<? echo base_url(); ?>admin/dashboard"
                title="Indholdsfortegnelse"
            >
			</a>
        <?}else{?>
			<a class="global_indhold"  href="<? echo base_url(); ?>deltager/dashboard/<? echo $ingame['ingame_id'] ;?>" title="Indholdsfortegnelse">
			</a>
        <? } ?>

			<a class="global_begivenheder" href="<? echo base_url(); ?>almanak/side/<? echo $ingame['primaer_begivenhed']; ?>" title="<? echo $ingame['primaer_begivenhed_alt']; ?>">
			</a>

			<a class="global_folk" href="<? echo base_url(); ?>almanak/side/<? echo $ingame['primaer_gruppe']; ?>" title="<? echo $ingame['primaer_gruppe_alt']; ?>">
			</a>

			<a class="global_steder" href="<? echo base_url(); ?>almanak/side/<? echo $ingame['primaer_sted']; ?>" title="<? echo $ingame['primaer_sted_alt']; ?>">
			</a>

		</nav>
	

	</div>
<? }





/*

	?>
<div style="float:right;text-align:right">
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>deltager/logout">
		Log ud
	</a><br>
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>crud_todo">
		Se og tilføj til to-do-listen
	</a><br>
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>core/opret/ny/individ">
		Opret NPC
	</a><? echo nbs(2); ?>
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>core/opret/ny/gruppe">
		Opret gruppe
	</a><? echo nbs(2); ?>
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>core/opret/ny/sted">
		Opret sted
	</a><? echo nbs(2); ?>
	<a style="background:#F4EFE4;padding:5px;" class="rubrik" href="<? echo base_url(); ?>core/opret/ny/begivenhed">
		Opret begivenhed
	</a>
</div>
	
		<? //echo img('img/nytlayout/logo/taoc_logo.png','');?>

	<!--Lav en if-clause, der afgør om der skal stå "vælg" eller "skift" alt efter om ingame-id allerede er sat-->
	<?
}*/
?>

</div>

<script type="text/javascript">
$(document).ready(function() {

//   var lupInFocus = $(".lup_soeg").focus();

   function enter_submit() {


            $(".lup_soeg").keypress(function(e) {
                if(e.which == 13) {
                    $(".lup_soeg").die("focus");
                    $('#lup_find').submit();
                }
            });


    }

    $(window).load(enter_submit);

    $(".banner").change(enter_submit);


});
</script>



